package xyz.xtt.asset.validator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.validation.Payload;
import jakarta.validation.Constraint;

/**
 * @author huqibo
 */
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = EnumValueValidator.class) // 指定校验器

public @interface EnumValue {
	// 默认消息
	String message() default "值不在允许范围内";

	// 组
	Class<?>[] groups() default {};

	// 负载数据
	Class<? extends Payload>[] payload() default {};

	// 允许的字符串值
	String[] stringValues() default {};

	// 允许的长整型值
	long[] longValues() default {};

	// 允许的整型值
	int[] intValues() default {};
}